<%--
  Created by IntelliJ IDEA.
  User: GiantM
  Date: 2018/3/9
  Time: 9:51
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<html>
<head>
    <title>配件更新</title>
    <base href="<%= request.getContextPath()%>/">
    <link href="bootstrap/dist/css/bootstrap.css" rel="stylesheet">
</head>
<body>
<div class="container">
    <form:form method="post" action="carparts/update" modelAttribute="carParts" enctype="multipart/form-data">
        <table class="table">
            <input type="hidden" name="pieceId" value="${parts.pieceId}">
            <input type="hidden" name="name" value="${name}">
            <input type="hidden" name="page" value="${page}">
            <tr>
                <td>
                    配件图片
                    <img src="show/${parts.piecePic}" width="50px">
                </td>
                <td>
                    <input type="file" name="file">

                </td>
            </tr>
            <tr>
                <td>配件名字</td>
                <td>${parts.pieceName}</td>
            </tr>
            <tr>
                <td>配件代号</td>
                <td><input type="text" name="pieceEname" value="${parts.pieceEname}"><br></td>
            </tr>
            <tr>
                <td>数量</td>
                <td><input type="text" name="pieceNum" value="${parts.pieceNum}"><br></td>
            </tr>
            <tr>
                <td>供应商</td>
                <td><input type="text" name="pieceSupply" value="${parts.pieceSupply}"><br></td>
            </tr>
            <tr>
                <td>地址</td>
                <td><input type="text" name="supplyAddress" value="${parts.supplyAddress}"><br></td>
            </tr>
            <tr>
                <td>联系人</td>
                <td><input type="text" name="supplyPerson" value="${parts.supplyPerson}"><br></td>
            </tr>
            <tr>
                <td>电话号码</td>
                <td><input type="text" name="supplyTel" value="${parts.supplyTel}"><br></td>
            </tr>
            <tr>
                <td>销售单价</td>
                <td><input type="text" name="priceDan" value="${parts.priceDan}"><br></td>
            </tr>
            <tr>
                <td>采购单价</td>
                <td><input type="text" name="priceCai" value="${parts.priceCai}"><br></td>
            </tr>

            <tr>
                <td>配件类型</td>
                <td>
                    ${parts.type.partsName}
                    <%--<form:select path="type.partsId" items="${types}" itemValue="partsId" itemLabel="partsName"></form:select>--%>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <input type="submit" name="添加">
                </td>
            </tr>
        </table>
    </form:form>
</div>
</body>
</html>
<script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
<script src="bootstrap/dist/js/bootstrap.js"></script>
